﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using Models;

namespace Dryricenet
{
    public partial class home_Pay : System.Web.UI.Page
    {
       
        protected void Page_Load(object sender, EventArgs e)
        {


            if (!IsPostBack)
            {
                Literal1.Text = Request.QueryString["ordertitle"];
                Literal2.Text = Request.QueryString["sum"];
                if (payBLL.orderPay(Literal1.Text).ToString() == "已付款")
                {
                    Response.Write("<script>javascript:alert('您以支付!');history.back();</script>");
                    Response.Redirect("home_Iorder.aspx");
                }
            }

        }

        protected void btnPayment_Click(object sender, EventArgs e)
        {
            
            if (OrderBLL.orderPayBLL(Literal1.Text))
            {
                Response.Write("<script>javascript:alert('支付成功!');history.back();</script>");
            }
            else {
                Response.Write("<script>javascript:alert('支付失败!');history.back();</script>");
            }
        }
    }
}